You don't happen to work in Covington, Danville, Frankfort, Lexington-Fayette County, Louisville, Morehead, or Vicco do you? All those cities have local non-discrimination ordinances that will cover you if you come out. Otherwise all those federal agencies are great, but you're still unemployed while the lawyers fight it out for years in the courts.
if your immediate boss is ok with the long hair you should be fine on an unofficial capacity since he/she would be the one in charge of policing the policy. This arrangement only works until a new supervisor shows up and isn't happy with it. In this case you may be able to throw out the threat of taking it to court for discrimination, but beware that things may turn hostile very quickly if it goes that direction.
I would polish up the resume and keep the feelers out there for another position just in case. If it's a big company, go talk to the HR department and they should be well versed in the local discrimination laws and be able to tell you what you can do in confidence.
I worked for a Mississippi based company for a little while and there was nothing to protect me from discrimination. I talked to the HR department and they said I would be fired and there was no recourse. In a situation like this, your best bet is to find a better environment to work in.
Good luck with it