You're right this was changed in MyBatis Multi-db vendor support + other simple tweaks · Activiti/Activiti@d5ce081 · GitHub
So in v6+ of the engine the database-specific parts of queries are handled by those variables like limitBefore that come from the properties file.
In the latest version of Activiti 5 the old approach is still used where db-specific statements are added Activiti/DbSqlSessionFactory.java at 5.x · Activiti/Activiti · GitHub and they can be used in the xml e.g. Activiti/ProcessDefinition.xml at 5.x · Activiti/Activiti · GitHub
So for v5 it would be possible to add a db-specific query to Activiti/HistoricVariableInstance.xml at 5.x · Activiti/Activiti · GitHub and reference it in DbSqlSessionFactory.
For newer versions of the engine to add the oracle-specific hint it would be necessary to define a new variable like limitBefore can come from oracle.properties and register it in ProcessEngineConfigurationImpl.