patched Darwin sort-bed build process and removed redundant setlocale call