Fixes compile issues accross 32/64bit targets