namespaced libc functions in bg_lib to prevent collisions with emscripten
updated entrypoint definitions to compile properly with emscripten
added major vid_restart fast hack to enable responsive window resizing