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.
Add test for count_if() with custom function
Merge pull request #206 from kylelutz/fix-count-if

Fix bug with count_if() on AMD