Bug 506721 - Convert JSVAL_TO_INT and INT_TO_JSVAL to functions. r=Waldo.