Run-time reg context selection for POSIX targets

Instantiate RegisterContext... based on getOS() instead of with
compile-time #ifdef-ery.

The assert() here is unfortunate, but better than crashing with no
explanation.

This change is equivalent to r186865 for elf-core.