Fix a couple of bugs in handling symbolic values
Extedn the JSValue API a bit