Fixed compatibility issue with the Standalone Framework and Dojo. Closes #2268.