Fixes to byte string handling in OAuth JSON routines