MA-SAM: Modality-agnostic SAM Adaptation for 3D Medical Image Segmentation