Revert part of previous change: no leading underscoere on snprintf
Add includes needed for linux build: integer limits and standard exceptions.