OSX Compatibility Changes

Made some minor modifications to a couple files to allow compilation on OSX.