Fix errors with None-GNU sed.
Fix the make error on MacOSX.