Use correct extension and OSX detection.