Adds monotonic clock implementation for OSX

Mac OSX does not have clock_gettime(). This adds a monotonic clock
implementation based on this stackoverflow answer

http://stackoverflow.com/questions/11680461