Fix examples/native to use $global for window reference