Ported support for $numberLong to 3.0.x

Refs: JAVA-1272