Try:
var WL = WL || {};
WL.profileCollection = WL.profileCollection || {};
//rest of your code
Remove: WL.namespace('WL.profileCollection');
A defect was opened to add WL.namespace
back to the code, the work around is above.
Make sure you remove any if statements preventing the code from getting executed:
if (WL.Client.getEnvironment() === 'android' && ...) { ... }
or make sure you add the preview/common environment to those if statements. Before Worklight 6.0 JSONStore was only supported on Android and iOS environments, that's why the Wizard generated those if statements by default. With Worklight 6.0 there's a compatible JavaScript-only API available for developing JSONStore applications faster. More on the What's new section inside IBM Information Center.