Molecular-dynamics study of ductile and brittle fracture in model noncrystalline solids