Change build script to don't give a warning on my machine

The `$(expr substr)` doesn't seem to work.
So, make if and elif explicit to avoid it.

Signed-off-by: Stefan Marr <git@stefan-marr.de>