Please do not access globals directly:  http://kovshenin.com/2012/current-url-in-wordpress/