Cast unsigned longs to ints when using uregx functions to remove build warnings.