Apply user-contributed patch for compilation under Mac OS. Thanks Ziggy!