erlc: replace if expression with case of

Motivated by the bug fix in 2c4d7d1.
Merge pull request #290 from tuncer/erlc-case-of

erlc: replace if expression with case of