fixed memory leak for non flash targets
changed if-statement to check HXP.renderMode
Merge pull request #82 from XXLTomate/CanvasFix

fixed memory leak for non flash targets