Attempt to fix linux & os x opt compile errors without breaking win32