Create app object on heap for some platforms to prevent stack overflow
Fixes for removed ToString methods