Improve dojo 2 TS core compatibility