Optional conversion of ObjectIDs

I have a use case where ObjectIDs should be retained as such, but I want to use the normal format. I could just copy the code, but making it a flag works just fine here. It also reduces the amount of code which is a good thing!

I've added tests which check that the functionality works in both directions as before.