configure: Moved configure's detection of XShape to a dedicated macro