It seems to me that the "ako" in this sentence acts as what they call in linguistics, a 'topic'. If you know Korean, Japanese or Chinese, you might know what I'm talking about because they use it very frequently and in fact have special particles for marking them for the former two. Anyway, it's used to introduced a new, well, topic to talk about, especially if the context has a previous different one being talked about. The sentence might translate to "(As for) Me, I get my hair cut whenever it's long" which implies that "I" was not being talked about before this. It is not necessarily the subject, but in this case, it is also implied that it is, although it is actually not in the sentence structure. ("Ako" has to be after the verb "nagpapagupit" in order to be the actual subject in the sentence, but maybe because of redundancy, "ako" as a topic is sufficient to say). You can also say "Ako, nagpapagupit ako kapag mahaba na ang buhok ko" which is also the same thing but there is an actual subject in the sentence.