[TIMOB-18064] Enhances build script to allow more flexibility

This PR enhances the build script to allow more flexibility in building JavaScriptCore in different configurations, and helps my efforts as I work on [TIMOB-18064](https://jira.appcelerator.org/browse/TIMOB-18064).