Fix warning of unused variable in non-OSX builds