JIT: add fselx implementation

Based on a patch by Tilka.