Fixed compiled warnings/errors with OSX 10.10