fixed #if, fixed hasOwnProperty bug in as3 target
further #if fixes fixed bug with hasOwnProperty in as3 target