I've got moreless the same setup - users are required to give their full birthdate to register, but can hide that form being displayed anywhere.
In functions_databuild.php FIND
PHP Code:
$bdays = $DB_site->query("
SELECT username, userid, birthday
FROM " . TABLE_PREFIX . "user
Modify that query to select only those users who do allow their birthdate being displayed and you're done.
Also, don't forget to call build_birthdays() from profile.php when a user changes the display option.