Checks before writing to window.IDBTransaction

These two lines
        window.IDBTransaction.READ_ONLY = window.IDBTransaction.READ_ONLY || "readonly";
        window.IDBTransaction.READ_WRITE = window.IDBTransaction.READ_WRITE || "readwrite";

trigger an error in IE11:

SCRIPT5045: Assignment to read-only properties is not allowed in strict mode

This patch checks if they exist before attempting to write.