Updates to OS specific functions for Mac OSX