fix stub createBackgroundTransaction to match API

in api.js:433 the createBackgroundTransaction function supports up to three arguments with the second argument being optional. If the api fails to load and the stub fallback is used, it will fail in cases where three arguments were used. I've updated the createBackgroundTransaction stub to support all three arguments conditionally.