Fix bug with count_if() on AMD

This fixes an issue in which the count_if_with_reduce()
function fails to compile because convert_ulong(bool) is
not supported.

See issue #202.