Add JavaScriptCore (builtin Mac JS engine) support

Same patch should work on stable branch. I did not update any documentation about supported JS engines. I understand that JsEngine.py needs refactoring, and I considered including that in this pull request. If desired I could do the refactoring by adding a utility function to run a command and return its stripped output.