Support building without locale.h

Slightly modified patch from Gianluigi Tiesi.
http://dev.yorhel.nl/ncdu/bug/47