Fix verification error on ART runtime

Move monitor-enter outside try block, if the monitor-enter fails to acquire the lock, we should not attempt to release it.