modify code to be compatible with playn html backend

fix for https://github.com/asilvestre/jpurexml/issues/1