Applying changes from https://trac.macports.org/browser/trunk/dports/aqua/LyX?order=name#files to make sure it compiles on MacOSX 10.9