Create window.FreePBX object correctly