SetupEnvironment() commit

This function was accepted into https://github.com/bitcoin/bitcoin/commit/5248ff40997c64cc0fde7aaa67cf94dd38b14899 & fixes locale bugs in Linux / Unix.