Mechanism of inhibition of cholinesterases by huperzine A