Fix FIX2INT and FIX2UINT C-APIs.

Closes #2697.
Manually tested it by checking out the PR.