A 7.7 magnitude earthquake has rocked Thailand and Myanmar, killing at least two people in Bangkok.