Fixed compilation in OSX Mavericks

Made the code to compile on OSX Mavericks.