Compatibility fix for older Emacs versions
Some fixes that preventing proper parsing of output on OSX