Only use Random module when Ruby version is 1.9+