changes to get code compiled on os x