makepkg: use "declare -f" to test for function presence