Use regex for OS matching

As discussed in #12