Fix compilation on OSX 10.10

Closes #1646