(#1247) Fix async api.id for WebSQL

This commit completes the changes made in
6f2343e2ec9b62c230dc17475ac8a645b1230e7d
so that WebSQL passes the unit tests in
test.basics.js.