Fixes JS compat so the driver with work with PTP

@Frijol I had the same failing tests in `apiTest.js` before and after these changes.

Specifically, the 800Hz data rate and setting scale range failed.

Can you check it out?