Fixed OSX compile error