Modification for compiling without issues on OS X