Fixed building on OSX 10.5 and newer