Node.js hash_hmac platform differences (Mac vs Ubuntu)

I was wondering what may affect differences in computing hash between Mac (x64) and Ubuntu (32 bit). Let's start with beginning:

Hashes generated on Ubuntu:

var string = "123";
// '123'
var hashKey = "abc";
// 'abc'
crypto.createHmac('sha512', hashKey).update(string).digest('hex')
// '1bb47a2e086bfab3a86e3843ffd665fead90f0ef46cf2894c56a194fb18158685e9fd364bde008d5f2cb04e649c7396adda38dc5617a9dd56ab981920ae13188'
crypto.createHmac('sha1', hashKey).update(string).digest('hex')
// 'be9106a650ede01f4a31fde2381d06f5fb73e612'

Hashes generated on MacOS:

var string = "123";
// "123"
var hashKey = "abc";
// "abc"
crypto.createHmac('sha512', hashKey).update(string).digest('hex');
// "290f6f3488e8f8a62bdd91fcf7a255158e5034822667819d83fd2e77ece9e3edf44899aaf23cb1faf33826cdcc2724ac8c37e279d7133b01ecf9ba4b54f529e4"
crypto.createHmac('sha1', hashKey).update(string).digest('hex');
// "2d3aacdfbadf59cf8fb6b27bf576fcd783b8996c"

And as you can see hashing the same values gives us different results depending on platform :( And it doesn't depend on hash method (as in example)

One of suggestions I'd found was to take care of line endings, but... there are no line endings in my case (hashing passwords - Yeah! I know I should use bcrypt, but it's quite a big deal to migrate users now).

Any other ideas/suggestions?