Thai PM says martial law to be lifted before election