Support for OSX: error code is not defined on OSX, solved with preprocessor. Added async call to wipe test so the test actually passes on OSX.