Add method to enable dynarec during build
Fix potential crash when closing ROM