Configure: Moved configure's detection of XShm to a dedicated macro