Ensure boost.locale is initialized with a UTF-8 locale on OS X

This fixes the find/replace dialog stripping non-us-ascii characters
from the file.

See #1587 for the same issue on Windows.