gps plugin: Replace busy loop with pthread_cond_timedwait().