Costa Rica declares state of emergency over flow of migrants transiting country