Fix usage of deprecated API
Fix mach port leak
Don't dispose V8 if it was never initialized