Optimized isValidEmail function and load json.lib.php always as it contains common Dolibarr functions