Pure JS integer to/from base64 converter