This test is OK right now, but when we get mongo version 3.0 it will fail (without reason).
A slight change fixes the problem:

    return ((mongoVersionMayor == 2) && (mongoVersionMinor >= 4)) || (mongoVersionMayor > 2);