Fixes option detection for timeout value.

It was checking has_threads instead of has_timeout, Minor copy paste mishap.