Fixes for Firefox support on OSX