Change back to if-else for version-specific code

Prevents problems in version-specific files from incorrectly
throwing "version not supported" errors.