Myanmar declares an emergency in its capital and its second-largest city after a 7.7 earthquake, state media say.