Use correct thread priority setting mechanism.

Closes #5