Defaulting to new API on OSX and old API otherwise