Fix #692: Clean up main detection: Only detect JSApp